﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class rdgc : System.Web.UI.Page
{
    News n = new News();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            BindGXJS();
            BindYBGC();
            this.Label1.Text = n.GetContentByCid(302);
            this.Label2.Text = n.GetContentByCid(336);
        }
    }

    public void BindGXJS() //高新技术
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 10 * from news where classid=304 order by id desc",dt);
        this.DataList1.DataSource = dt;
        this.DataList1.DataBind();
    }

    public void BindYBGC() //样板工程
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 8 * from news where classid=303 order by id desc", dt);
        this.DataList2.DataSource = dt;
        this.DataList2.DataBind();
    }

}
